package com.ys.enume.sys;

public class SysMenuEnum {
	
	public enum Lev {
		ONE("一级菜单", 1), TWO("二级菜单", 2), THREE("三级菜单", 3);
		public String name;
		public Integer value;

		private Lev(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
	}
	
	/**
	 * 模板类型
	 */
	public enum TypeTemplet {
		LIST_NORMAL("普通列表", 1),
		TREE_WITH_LIST("树+列表", 2),
		TREE_WITH_CHECKBOX("树+复选框", 3),
		LIST_UP_AND_DOWN("上下列表", 4),
		TREE_WITH_IFRAME("树+IFRAME", 5),
		DIY("自定义", 10);
		public String name;
		public Integer value;

		private TypeTemplet(String name, Integer value) {
			this.name = name;
			this.value = value;
		}

		public static String getName(int value) {
			for (TypeTemplet e : TypeTemplet.values()) {
				if (e.value == value) {
					return e.name;
				}
			}

			return "";
		}
	}
}
